import requests


class IhrmloginApi(object):
    def login(self, req_data):
        res = requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                            json=req_data)
        return res


if __name__ == '__main__':
    ihrm1 = IhrmloginApi()
    req_data = {"mobile": "13800000002", "password": "123456"}
    res = ihrm1.login(req_data)
    print(res.json())
